<!-- 1.单。双引符号嵌套 -->
<!-- var str1='单引号字符串';
var str1="双引号字符串";
var str ='I am a "programmer"';
var str ="I'am a 'prigrammer'"; -->
<!-- 2.转义符--常用转义符 -->
<!-- var str1= 'I\'m a programmer';  // I'm a programmer
 var str2= 'I am a\ nprogrammer';  //I am a(换行) nprogrammer
 var str2= 'c:\\ user \\';  //  c:\user\
 var str2= 'c:\\ user \\';  //  c:\user\
 var str2= 'x61bc';  //  abc
 var str2= 'u579d好学生';  //  好学生 -->
<!-- 3.字符串长度 -->
<!-- 4.访问字符穿中的字符 -->
<!-- 5.字符串拼接 -->


<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>2.14字符串型 显示年龄案例</title>
    <script>
        //弹出一个输入框，让用户输入年龄
        var age = prompt('请输入您的年龄');
        //将年龄和字符串拼接
        var msg = '您今年' + age + '岁了';
        //弹出警告
        alert(msg);
    </script>


</head>

<body>

</body>

</html>